﻿export default [
  {
    // 登录
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './user/Login',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },

  // 欢迎页
  {
    path: '/welcome',
    name: 'welcome',
    icon: 'smile',
    component: './Welcome',
  },

  // 员工管理
  {
    path: '/employee',
    name: 'employee',
    component: './Employee',
    icon: 'user',
    routes: [
      {
        path: '/employee/admin',
        name: 'admin',
        component: "./Admin"
      },
      {
        path: '/employee/driver',
        name: 'driver',
        component: "./Driver"
      }
    ]
  },

  // 资产管理
  {
    path: '/resource',
    name: 'resource',
    component: './Resource',
    icon: "payCircle",
    routes: [
      {
        path: '/resource/station',
        name: 'station',
        component: './Station',
      },
      {
        path: '/resource/bus',
        name: 'bus',
        component: './Bus',
      },
    ]
  },

  // 车次
  {
    path: '/busno',
    name: 'busno',
    component: './BusNo',
    icon: "snippets",
    routes: [
      {
        path: '/busno/detail',
        name: 'detail',
        component: './BusNoDetail'
      },
      {
        path: '/busno/dayly',
        name: 'dayly',
        component: './Dayly',
      },
      // TODO: 优惠
    ]
  },

  // 丢弃
  {
    path: '/admin',
    name: 'admin',
    icon: 'crown',
    access: 'canAdmin',
    component: './Admin',
    routes: [
      {
        path: '/admin/sub-page',
        name: 'sub-page',
        icon: 'smile',
        component: './Welcome',
      },
      {
        component: './404',
      },
    ],
  },
  // {
  //   path: "/table",
  //   component: "./TableList",
  //   name: "table.list"
  // },

  // 默认页面
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    component: './404',
  },

];
